package com.zmn.oms.business.impl.base;

import com.zmn.oms.common.exception.OmsBaseException;
import com.zmn.oms.model.bo.work.EsAggBuilder;
import com.zmn.oms.model.entity.work.OrderWorkFilter;
import org.elasticsearch.index.query.BoolQueryBuilder;
import org.springframework.data.elasticsearch.core.query.NativeSearchQuery;

@Deprecated
public class EsOrderAggBuilderCallbackImpl extends AbstractListEsQueryServiceImpl implements EsAggBuilder.BuiderCallback {

    @Override
    public void accept(NativeSearchQuery nativeSearchQuery, OrderWorkFilter orderWorkFilter) {
        BoolQueryBuilder query = (BoolQueryBuilder) nativeSearchQuery.getQuery();
        try {
            super.appendPermitData(orderWorkFilter,query);
        } catch (OmsBaseException e) {
        }
    }
}